
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*,java.util.*,java.util.Date"%>
<jsp:useBean id="ConBean" scope="session" class="com.bitc.ch13.DBCon"/>
<%
String user = (String)session.getAttribute("user");
if(user == null || user == ""){
response.sendRedirect("denglu.htm");
return;
}
String biaoti = new String(request.getParameter("biaoti").getBytes("iso8859_1"));
String sContent = new String(request.getParameter("content1").getBytes("iso8859_1"));
String radio = request.getParameter("emotion");

Connection con = ConBean.getConnection();
String	strSQL = "INSERT INTO jsp8_hui(vid,neirong,nameuser) Values (?,?,?)";
PreparedStatement pstmt = con.prepareStatement(strSQL);
pstmt.setString(1,id);
pstmt.setString(2,"<img src=image/"+radio+">"+sContent);
pstmt.setString(3,user);
pstmt.executeUpdate();
pstmt.close();
Statement stmt = con.createStatement();
String	strde = "update jsp8_wenzhang set newriqi = '"+shijian+"',huifuren = '"+aa+"'where id = '"+id+"'";
stmt.executeUpdate(strde);
String	strset = "update jsp8_user set huifu = huifu+1 where user_name = '"+aa+"'";
stmt.executeUpdate(strset);
stmt.close();
ConBean.close();
%>
